//
//  YHYLoadOneTableViewCell.m
//  TTMusic
//
//  Created by yanghuiyan on 16/4/1.
//  Copyright © 2016年 cpy. All rights reserved.
//

#import "YHYLoadOneTableViewCell.h"

@implementation YHYLoadOneTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.playButton = [UIButton buttonWithType:UIButtonTypeSystem];
        self.playButton.frame = CGRectZero;
        [self.playButton setImage:[[UIImage imageNamed:@"loadplay"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:(UIControlStateNormal)];
        [self.contentView addSubview:self.playButton];
        
        self.label = [UILabel new];
        self.label.text = @"随机播放全部歌";
        [self.contentView addSubview:self.label];
        
        self.managerButton = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.managerButton setImage:[[UIImage imageNamed:@"manager"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal ] forState:UIControlStateNormal];
        self.managerButton.frame = CGRectZero;
        [self.contentView addSubview:self.managerButton];
        
        self.managerLabel = [UILabel new];
        self.managerLabel.text = @"管理";
        [self.contentView addSubview:self.managerLabel];
        
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.playButton.frame = CGRectMake(20*FitWidth, 20*FitHeight, 30*FitWidth, 30*FitHeight);
    
    self.label.frame = CGRectMake(70*FitHeight, 20*FitHeight, 150*FitWidth, 30*FitHeight);
    
    self.managerButton.frame = CGRectMake(320*FitWidth, 20*FitHeight,30*FitWidth, 30*FitHeight);
    
    self.managerLabel.frame = CGRectMake(360*FitWidth, 20*FitHeight, 60*FitWidth, 30*FitHeight);
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
